/*Use the "crypt" function to encrypt the passward of the logining userThe Declaration of the function is:Char * crypt (const char * Key, const char * salt );Key: The passward to encryptSalt: Maid ([a-zA-Z0-9./]) Here we set "salt" the first and the last characterOf the AGRU keyReturn Value: contain 13 characters including the first two character is the "salt" AGRU2006-02-18-9: 40*/
# DEFINE _ xopen_source#
the wrong password of the user name and the number of verification errors reached 3 timesBut when it comes to writing, it's not as easy as it might seem, and it's a lot more problematic.First write out the basic login programuser_name=['a','b','C','D']#passwords and strings are saved in two lists and corresponding locationspassward=['1','2','3','4']input_user_name=STR (Input ("Please enter user name"))#Convert format to string formatINPUT_PASSWARD=STR (Input ("Please enter your password"))ifInp
Last written the login program is disorganized, I can not see, the teacher made the comments as followsSince the current dictionary is not too familiar with the first time,And then joins in a while loop really worksBut the sense code is still more redundant, the readability is super poorYes, now find a more useful debugging method, is to add a piece of print statement when each function is completed to show that the code is running, or how to implement a functionThe last time the code has a supe
Should the company planning requirements, need a database to import and export the tool with SVN to make the difference matching, easy to plan the database modification of the record tool, I use the bcp command to implement the following batch processing tools, in the middle of a lot of pits, is saved here hope to help the students need this tool.:: Database Address set ip=127.0.0.1:: Database Account set LOGIN=SA:: Database Password set Passward=
identifier we passed in (StatusCode), we know whether to enter the Onsuccess or OnFailure method. Then, in these methods, select the action that we want to take.Iv. the role of Resultmap in MyBatis:Reference: http://zhuyuehua.iteye.com/blog/1721715Namespace="Zhuxuekui.data.UserlistMapper"> " Userresultmap " type=" userlist "> " username "column=" Username ">" Passward " column="passward
After self-study, the paper solves several simple problems by using cyclic statements and judgment statements:1, the realization of 1 to 10 and:x = 1he = 0while x 2, the realization of 1 to 100 and:X=1he =0while x3, achieve 100 even add:x = 1while x 4, achieve the odd sum within 100:x = 1while x 5, the realization of seeking 1-2+3-4+5 ... 99 of all numbers of the and:x = 1he = 00while x 6. Achieve three landing attempts:Pure If statement version:Idcard = 123passward = 123x = 0a = input ("Please
Cocos2dx-3.3 network programming (CURL + PHP) NO.1 write PHP code in order to try network programming, read a lot of blog, now will this record in case of forgetting.
Before writing the connection code, we must do the following:
1. set up WAMP
2. create a database
3. write the PHP code.
4. test
I. WAMP construction
WAMP is easy to build. download and install it.
II. create a database
(Sorry, the password is wrong. it indicates that the following passwords are all wrong !)
the JSON stream, then the background redirection into the stream, and will not refresh the page, can only be received by the corresponding see page information. (want to see more on the Topic.alibabacloud.comAJAX Development Manual section of the study)
Then we know that in JS processing so you can use JS redirect windows.location.href= ' url '; jump to a specific page
JS Code
$ (function () {$ (' button '). Click (function () {var user = $ (' input[name=user] '); var pwd = $ (' input[na
One, mysqldump+bat processing files in MySQL
Script to perform MySQL database backup (BAT file contents)
The code is as follows
Copy Code
@echo offSet Host=localhostSet Username=rootSet Passward=ansureSet Database=weiheSet Backup_path=d:\db_backup\echo "Mysql Backup, please waitting"mysqldump-h%host%-u%username%-p%passward%--skip-lock-tables%database% >%backup_path%\%database%_
The procedure is very simple, it is done in three parts:
1. Create bat file, bat file contents
The code is as follows
Copy Code
@echo offSet Host=localhostSet Username=rootSet Passward=ansureSet Database=weiheSet backup_path=d:/db_backup/echo "Mysql Backup, please waitting"mysqldump-h%host%-u%username%-p%passward%--skip-lock-tables%database% >%backup_path%/%database%_%date:~0,1
Under Root access
Apt-get Install Mysql-serverapt-get Install mysql-client
Create a database
Mysql-u root-p passward linked databases CREATE DATABASE Basenameuse basename
If the database exists to be changed, it can be used directly
Mysql-u root-p Passward basename
Create a table
CREATE TABLE latest_face (ID int (one) not NULL auto_increment, camera_id varchar (+) NOT null, picture Mediumblob NOT NULL
Mysql database is a very important point in our WEB development and website. We can say that we need to back up the database in real time or one backup every day, but if we back up the database manually every day, this may be forgotten, next I will introduce how to use the batch processing method in windows to implement the regular mysql database backup method.
The steps are very simple, just do it in three steps:
1. Create a bat file and bat file content
The Code is as follows:
Cop
=" Wkiom1uljilg_mfeaacmq-ibtx0501.jpg "/>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5D/D4/wKioL1UlJcvh6Ci3AACJNTDtpl8743.jpg "style=" float: none; "title=" 10.png "alt=" Wkiol1uljcvh6ci3aacjntdtpl8743.jpg "/>Now to implement the input account, password# Vim Adduser.sh#!/bin/bash#Username= ' dialog--stdout--backtitle "Add a user."--title "Username"--inputbox "Please input a Username:" 10 30 "Retval=$?If [$RETVAL-eq 0-a-N "$Username"]; Then #判定 $? If the value is equal to 0 and the
In order to try the network programming, read a lot of great God's blog, now this record to prevent forgetting.
We have to do a few things before we write the connection code:
1. Build Wamp
2. Create a database
3. Write the PHP code well
4. Testing
A: Build Wamp
Wamp construction is very convenient, download and installation can be
Two: Create a database
(Sorry password wrong, here to explain, the following password are wrong!) )
Three: Write good PHP code check.php:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.